package com.uplooking.pojo;

import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="tblgood")
public class GoodVO {

	@Id
	@Column(name="gno")
	private String gno;
	@Column(name="gname")
	private String gname;
	@Column(name="gtype")
	private String gtype;
	@Column(name="gdesc")
	private String gdesc;
	@Column(name="gprice")
	private Double gprice;
	@Column(name="gsale")
	private Double gsale;
	@Column(name="gleft")
	private Integer gleft;
	@Column(name="gstatus")
	private Integer gstatus;
	@ManyToOne
	@JoinColumn(name="gstatus",insertable=false,updatable=false)
	private DictVO dictVO;
	public DictVO getDictVO() {
		return dictVO;
	}
	public void setDictVO(DictVO dictVO) {
		this.dictVO = dictVO;
	}
	@Column(name="gshop")
	private String gshop;
	@ManyToOne
	@JoinColumn(name="gshop",insertable=false,updatable=false)
	private ShopVO shopVO;
	public String getGno() {
		return gno;
	}
	public void setGno(String gno) {
		this.gno = gno;
	}
	public String getGname() {
		return gname;
	}
	public void setGname(String gname) {
		this.gname = gname;
	}
	public String getGtype() {
		return gtype;
	}
	public void setGtype(String gtype) {
		this.gtype = gtype;
	}
	public String getGdesc() {
		return gdesc;
	}
	public void setGdesc(String gdesc) {
		this.gdesc = gdesc;
	}
	public Double getGprice() {
		return gprice;
	}
	public void setGprice(Double gprice) {
		this.gprice = gprice;
	}
	public Double getGsale() {
		return gsale;
	}
	public void setGsale(Double gsale) {
		this.gsale = gsale;
	}
	public Integer getGleft() {
		return gleft;
	}
	public void setGleft(Integer gleft) {
		this.gleft = gleft;
	}
	public Integer getGstatus() {
		return gstatus;
	}
	public void setGstatus(Integer gstatus) {
		this.gstatus = gstatus;
	}
	public String getGshop() {
		return gshop;
	}
	public void setGshop(String gshop) {
		this.gshop = gshop;
	}
	public ShopVO getShopVO() {
		return shopVO;
	}
	public void setShopVO(ShopVO shopVO) {
		this.shopVO = shopVO;
	}
	public GoodVO() {
		super();
	}
	public GoodVO(String gname, String gtype, String gdesc, Double gprice, Double gsale, Integer gleft,
			Integer gstatus, String gshop) {
		super();
		this.gno = UUID.randomUUID().toString();
		this.gname = gname;
		this.gtype = gtype;
		this.gdesc = gdesc;
		this.gprice = gprice;
		this.gsale = gsale;
		this.gleft = gleft;
		this.gstatus = gstatus;
		this.gshop = gshop;
	}
	@Override
	public String toString() {
		return "GoodVO [gno=" + gno + ", gname=" + gname + ", gtype=" + gtype + ", gdesc=" + gdesc + ", gprice="
				+ gprice + ", gsale=" + gsale + ", gleft=" + gleft + ", gstatus=" + gstatus + ", gshop=" + gshop
				+ ", shopVO=" + shopVO + "]";
	}

}
